package com.zoe.onelink.common.constant;

/**
 * <p>标题: </p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2022</p>
 * <p>公司: 智业软件股份有限公司</p>
 *
 * @version: 1.0
 * @author: ruansheng
 * @date: 2022-07-07
 */
public class OnelinkMetricsConstant {

    public static class HttpClient {

        // 配置: 最大请求数 
        public static final String MAX_REQ_SIZE = "onelink.httpclient.maxReqSize";
        // 配置: 单主机最大请求数
        public static final String MAX_REQ_PER_HOST_SIZE = "onelink.httpclient.maxReqPerHostSize";
        // 配置: 核心线程数
        public static final String CORE_POOL_SIZE = "onelink.httpclient.corePoolSize";
        // 配置: 最大线程数
        public static final String MAX_POOL_SIZE = "onelink.httpclient.maxPoolSize";

        // 请求响应耗时统计
        public static final String RESP_TIME = "onelink.httpclient.respTime";
        // 正在执行的请求数
        public static final String REQ_RUNNING_COUNT = "onelink.httpclient.reqRunningCount";
        // 当前队列等待任务数
        public static final String REQ_QUEUE_TASK_COUNT = "onelink.httpclient.reqQueueTaskCount";
        // 当前活跃线程数
        public static final String ACTIVE_POOL_COUNT = "onelink.httpclient.activePoolCount";
        // 线程池运行时最大峰值
        public static final String LARGEST_POOL_SIZE = "onelink.httpclient.largestPoolSize";
        // 执行次数统计
        public static final String REQ_COUNT = "onelink.httpclient.reqCount";
    }

    public static class DataSource {

        // 当前连接池中的连接数
        public static final String POOLING_COUNT = "onelink.datasource.poolingCount";
        // 逻辑连接打开次数
        public static final String CONNECT_OPEN_COUNT = "onelink.datasource.connectOpenCount";
        // 逻辑连接关闭次数
        public static final String CONNECT_CLOSE_COUNT = "onelink.datasource.connectCloseCount";
        // 逻辑连接错误次数
        public static final String CONNECT_ERROR_COUNT = "onelink.datasource.connectErrorCount";
        // SQL执行数
        public static final String EXECUTE_COUNT = "onelink.datasource.executeCount";
        // 事务回滚次数
        public static final String ROLLBACK_COUNT = "onelink.datasource.rollbackCount";
        // 物理连接打开次数
        public static final String PHYSICAL_CONNECT_COUNT = "onelink.datasource.physicalConnectCount";
        // 物理关闭数量
        public static final String PHYSICAL_CLOSE_COUNT = "onelink.datasource.physicalCloseCount";
        // 物理连接错误次数
        public static final String PHYSICAL_CONNECT_ERROR_COUNT = "onelink.datasource.physicalConnectErrorCount";
        // 获取连接时累计等待多少次
        public static final String NOT_EMPTY_WAIT_COUNT = "onelink.datasource.notEmptyWaitCount";
        // 获取连接时累计等待多长时间
        public static final String NOT_EMPTY_WAIT_MILLIS = "onelink.datasource.notEmptyWaitMillis";
        // Clob打开次数
        public static final String CLOB_OPEN_COUNT = "onelink.datasource.clobOpenCount";
        // Blob打开次数
        public static final String BLOB_OPEN_COUNT = "onelink.datasource.blobOpenCount";

    }

    public static class Sql {

        public static final String SQL_EXEC_COUNT = "onelink.sql.execCount";
        public static final String SQL_CONSUME = "onelink.sql.consume";

    }


    public static class Redis {

        // 命令类型
        public static final String REQUEST_COUNT = "onelink.redis.request";

    }


}
